<template>
  <div class="tabBar">
    <van-tabbar
      v-model="active"
      active-color="#F63515"
      inactive-color="#000"
      fixed
      route
    >
      <van-tabbar-item replace to="/home" icon="wap-home-o"
        >首页</van-tabbar-item
      >
      <van-tabbar-item replace to="/category" icon="point-gift-o"
        >分类</van-tabbar-item
      >
      <van-tabbar-item
        replace
        to="/shopcart"
        icon="shopping-cart-o"
        :badge="this.$store.getters.goodsCP.allCount"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item replace to="/user" icon="user-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "tabBar",
  data() {
    return {
      active: 0,
      // badge: "",
    };
  },
  mounted() {
    // this.$bus.$on("badge", (num) => {
    //   this.badge = num;
    // });
  },
};
</script>

<style>
</style>